package com.vini.core.ec;

import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="users", catalog="hopon"
)
public class User  implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private Integer id;
     private String emailId;
     private String password;
     private String status;
     private String isVerified;
     private String verificationCode;
     private String isMobile;
     private boolean signupType;
     private String mobileNo;
     private String gender;
     private String birthdate;
     private String address;
     private int friendsCount;
     private String firstName;
     private String lastName;
     private String imageUrl;
     private String registrationId;
     private Long facebookId;
     private String twitterId;
     private String linkedinId;
     private String linkedinPublicprofile;
     private String line1;
     private String line2;
     private String city;
     private String state;
     private String country;
     private String pincode;
     private float totalCredit;
     private float totalGreenMiles;
     private String hoponMember;
     private int greenmilesCredit;
     private String profileStatus;
     private String verificationStatus;
     private String isUserguideActivitySettingsSaved;
     private int createdBy;
     private int updatedBy;
     private Date createdDt;
     private Date updatedDt;
     private List<Circles> circles;
     private Company company;
     private String locality;
     private List<Travel> travels;
     private List<Circles> createdCircles;
     private List<Vehicle> vehicles;

   
   
    @Id
    @GeneratedValue(strategy=IDENTITY)
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }

    
    @Column(name="email_id", nullable=false)
    public String getEmailId() {
        return this.emailId;
    }
    
    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    
    @Column(name="password", nullable=false)
    public String getPassword() {
        return this.password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }

    
    @Column(name="status", nullable=false, length=10)
    public String getStatus() {
        return this.status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }

    
    @Column(name="is_verified", nullable=false, length=2)
    public String getIsVerified() {
        return this.isVerified;
    }
    
    public void setIsVerified(String isVerified) {
        this.isVerified = isVerified;
    }

    
    @Column(name="verification_code", nullable=false)
    public String getVerificationCode() {
        return this.verificationCode;
    }
    
    public void setVerificationCode(String verificationCode) {
        this.verificationCode = verificationCode;
    }

    
    @Column(name="is_mobile", nullable=false, length=2)
    public String getIsMobile() {
        return this.isMobile;
    }
    
    public void setIsMobile(String isMobile) {
        this.isMobile = isMobile;
    }

    
    @Column(name="signup_type", nullable=false)
    public boolean isSignupType() {
        return this.signupType;
    }
    
    public void setSignupType(boolean signupType) {
        this.signupType = signupType;
    }

    
    @Column(name="mobile_no", nullable=false, length=15)
    public String getMobileNo() {
        return this.mobileNo;
    }
    
    public void setMobileNo(String mobileNo) {
        this.mobileNo = mobileNo;
    }

    
    @Column(name="gender", nullable=false)
    public String getGender() {
        return this.gender;
    }
    
    public void setGender(String gender) {
        this.gender = gender;
    }

    
    @Column(name="birthdate", nullable=false, length=35)
    public String getBirthdate() {
        return this.birthdate;
    }
    
    public void setBirthdate(String birthdate) {
        this.birthdate = birthdate;
    }

    
    @Column(name="address", nullable=false)
    public String getAddress() {
        return this.address;
    }
    
    public void setAddress(String address) {
        this.address = address;
    }

    
    @Column(name="friends_count", nullable=false)
    public int getFriendsCount() {
        return this.friendsCount;
    }
    
    public void setFriendsCount(int friendsCount) {
        this.friendsCount = friendsCount;
    }

    
    @Column(name="first_name", nullable=false)
    public String getFirstName() {
        return this.firstName;
    }
    
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    
    @Column(name="last_name", nullable=false)
    public String getLastName() {
        return this.lastName;
    }
    
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    
    @Column(name="image_url", nullable=false)
    public String getImageUrl() {
        return this.imageUrl;
    }
    
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    
    @Column(name="registration_id", nullable=false)
    public String getRegistrationId() {
        return this.registrationId;
    }
    
    public void setRegistrationId(String registrationId) {
        this.registrationId = registrationId;
    }

    
    @Column(name="facebook_id")
    public Long getFacebookId() {
        return this.facebookId;
    }
    
    public void setFacebookId(Long facebookId) {
        this.facebookId = facebookId;
    }

    
    @Column(name="twitter_id")
    public String getTwitterId() {
        return this.twitterId;
    }
    
    public void setTwitterId(String twitterId) {
        this.twitterId = twitterId;
    }

    
    @Column(name="linkedin_id")
    public String getLinkedinId() {
        return this.linkedinId;
    }
    
    public void setLinkedinId(String linkedinId) {
        this.linkedinId = linkedinId;
    }

    
    @Column(name="linkedin_publicprofile")
    public String getLinkedinPublicprofile() {
        return this.linkedinPublicprofile;
    }
    
    public void setLinkedinPublicprofile(String linkedinPublicprofile) {
        this.linkedinPublicprofile = linkedinPublicprofile;
    }

    
    @Column(name="line_1", nullable=false, length=65535)
    public String getLine1() {
        return this.line1;
    }
    
    public void setLine1(String line1) {
        this.line1 = line1;
    }

    
    @Column(name="line_2", nullable=false, length=65535)
    public String getLine2() {
        return this.line2;
    }
    
    public void setLine2(String line2) {
        this.line2 = line2;
    }

    
    @Column(name="city", nullable=false, length=50)
    public String getCity() {
        return this.city;
    }
    
    public void setCity(String city) {
        this.city = city;
    }

    
    @Column(name="state", nullable=false, length=50)
    public String getState() {
        return this.state;
    }
    
    public void setState(String state) {
        this.state = state;
    }

    
    @Column(name="country", nullable=false, length=100)
    public String getCountry() {
        return this.country;
    }
    
    public void setCountry(String country) {
        this.country = country;
    }

    
    @Column(name="pincode", nullable=false, length=20)
    public String getPincode() {
        return this.pincode;
    }
    
    public void setPincode(String pincode) {
        this.pincode = pincode;
    }

    
    @Column(name="totalCredit", nullable=false, precision=12, scale=0)
    public float getTotalCredit() {
        return this.totalCredit;
    }
    
    public void setTotalCredit(float totalCredit) {
        this.totalCredit = totalCredit;
    }

    
    @Column(name="totalGreenMiles", nullable=false, precision=12, scale=0)
    public float getTotalGreenMiles() {
        return this.totalGreenMiles;
    }
    
    public void setTotalGreenMiles(float totalGreenMiles) {
        this.totalGreenMiles = totalGreenMiles;
    }

    
    @Column(name="hoponMember", length=2)
    public String getHoponMember() {
        return this.hoponMember;
    }
    
    public void setHoponMember(String 	hoponMember) {
        this.hoponMember = 	hoponMember;
    }

    
    @Column(name="greenmiles_credit", nullable=false)
    public int getGreenmilesCredit() {
        return this.greenmilesCredit;
    }
    
    public void setGreenmilesCredit(int greenmilesCredit) {
        this.greenmilesCredit = greenmilesCredit;
    }

    
    @Column(name="profile_status", nullable=false, length=2)
    public String getProfileStatus() {
        return this.profileStatus;
    }
    
    public void setProfileStatus(String profileStatus) {
        this.profileStatus = profileStatus;
    }

    
    @Column(name="verification_status", nullable=false, length=2)
    public String getVerificationStatus() {
        return this.verificationStatus;
    }
    
    public void setVerificationStatus(String verificationStatus) {
        this.verificationStatus = verificationStatus;
    }

    
    @Column(name="is_userguide_activity_settings_saved", nullable=false, length=6)
    public String getIsUserguideActivitySettingsSaved() {
        return this.isUserguideActivitySettingsSaved;
    }
    
    public void setIsUserguideActivitySettingsSaved(String isUserguideActivitySettingsSaved) {
        this.isUserguideActivitySettingsSaved = isUserguideActivitySettingsSaved;
    }

    
    @Column(name="created_by", nullable=false)
    public int getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(int createdBy) {
        this.createdBy = createdBy;
    }

    
    @Column(name="updated_by", nullable=false)
    public int getUpdatedBy() {
        return this.updatedBy;
    }
    
    public void setUpdatedBy(int updatedBy) {
        this.updatedBy = updatedBy;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="created_dt", nullable=false, length=19)
    public Date getCreatedDt() {
        return this.createdDt;
    }
    
    public void setCreatedDt(Date createdDt) {
        this.createdDt = createdDt;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="updated_dt", nullable=false, length=19)
    public Date getUpdatedDt() {
        return this.updatedDt;
    }
    
    public void setUpdatedDt(Date updatedDt) {
        this.updatedDt = updatedDt;
    }
    
    @OneToMany(mappedBy = "circleOwner", cascade = CascadeType.ALL, targetEntity = Circles.class)
    public List<Circles> getCircles() {
		return circles;
	}


	public void setCircles(List<Circles> circles) {
		this.circles = circles;
	}

	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="company")
	public Company getCompany() {
		return company;
	}


	public void setCompany(Company company) {
		this.company = company;
	}

	@Column(name="locality")
	public String getLocality() {
		return locality;
	}


	public void setLocality(String locality) {
		this.locality = locality;
	}

	@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, targetEntity = Travel.class)
	public List<Travel> getTravels() {
		return travels;
	}


	public void setTravels(List<Travel> travels) {
		this.travels = travels;
	}

	@OneToMany(mappedBy = "creator", cascade = CascadeType.ALL, targetEntity = Circles.class)
	public List<Circles> getCreatedCircles() {
		return createdCircles;
	}


	public void setCreatedCircles(List<Circles> createdCircles) {
		this.createdCircles = createdCircles;
	}
	@OneToMany(mappedBy = "vehicleOwner", cascade = CascadeType.ALL, targetEntity = Vehicle.class)
	public List<Vehicle> getVehicles() {
		return vehicles;
	}

	public void setVehicles(List<Vehicle> vehicles) {
		this.vehicles = vehicles;
	}


}


